class @ProfileRoutes extends Backbone.Router
    routes:
        "Profile/Show/:login*path": "Show"
        "Profile/RatedBooks/:login*path": "RatedBooks"
    Show: (login, path) ->
        model = new ShowProfileModel()
        model.set("Login", login)      
        layoutModel = new socialLayoutModel()
        layoutModel.set('Login',login)
        layout = new socialLayoutView({model:model})
        view = new ShowProfileView({model: model})

    RatedBooks: (login, path) ->
        layout = new LibraryLayoutView()
        model = new ProfileRatedBooksModel()
        model.set("Login", login)

        column = Url.GetParameterByName("Column")
        if column.length
            model.setStaticProperty("Column", column)

        direction = Url.GetParameterByName("Direction")
        if direction.length
            model.setStaticProperty("Direction", parseInt(direction))

        viewType = Url.GetParameterByName("viewType")
        if viewType.length
            model.setStaticProperty("BookViewType", parseInt(viewType))

        view = new ProfileRatedBooksView({model: model})
